import React from 'react';
import './lottery.css';

class Lottery extends React.Component {
    constructor (props) {
        super(props);

        this.state = {
            count: 0,
            list: []
        };

        this.storage = {
        };
    }

    static getDerivedStateFromProps (props, state) {
        return {
            count: props.count,
            list: props.list
        };
    }

    componentDidMount () {
    }

    render () {
        return (
            <div className="lotteryWrapper">
                <div className="row">
                    <div className="col">
                        <p><span className="title">幸运抽奖</span> | 今日抽奖次数 {this.state.count} 次</p>
                        <p>连续签到可获得更多抽奖机会哦</p>
                    </div>
                    <div className="col" style={{ marginLeft: 'auto' }}>
                        <a className="btn-lottery">立即抽奖</a>
                    </div>
                </div>
                <ul className="awardList">
                    {
                        this.state.list.map((item, index) => {
                            return <li key={index}><img src="" /></li>;
                        })
                    }
                </ul>
            </div>
        );
    }
}
export default Lottery;
